import { defHttp } from "@/utils/http";
// 创建病人基本信息
export function create_patients(data: any) {
	return defHttp.put({ url: "/his/th-patients/saveupdate", data });
}
// 获得急诊预约
export function get_emergencies(params: any) {
	return defHttp.get({
		url: "/his/opm-emergencies/get",
		params
	});
}
// 获得急诊预约分页
export function get_emergencies_page(params: any) {
	return defHttp.get({
		url: "/his/opm-emergencies/page",
		params
	});
}
// 更新急诊预约
export function update_emergencies(data: any) {
	return defHttp.put({ url: "/his/opm-emergencies/update", data });
}
// 创建急诊预约
export function create_emergencies(data: any) {
	return defHttp.post({ url: "/his/opm-emergencies/create", data });
}
// 创建急诊预约
export function del_emergencies(id: string) {
	return defHttp.delete({ url: `/his/opm-emergencies/delete?id=${id}` });
}

// 607
// 急症室统计展示
export function get_selectEmergen(data: any) {
	if (data.dtime) {
		data = { ...data, dtime: data.dtime.split(" ")[0] };
	}
	return defHttp.post({
		url: "/his/opm-comprehensive/selectEmergen",
		data
	});
}
// 612
// 获得急诊预约分页
export function get_treatment(params: any) {
	return defHttp.get({
		url: "/his/treatment-phm/page",
		params
	});
}
// 305
// 获得体检预约分页by grpId
export function get_pagebygrpId(params: any) {
	return defHttp.get({
		url: "/his/opm-checkups/pagebygrpId",
		params
	});
}
// 创建患者健康状态
export function create_patient_cond(data: any) {
	return defHttp.post({ url: "/his/th-patient-cond/create", data });
}
